Skip to content

Fix Connections regressions from #102265 - #104402

Merged
lakchote merged 10 commits into
Expensify:mainfrom
Krishna2323:krishna2323/fix/connections-regressions
Oct 24, 2026
Merged

lakchote merged 10 commits into
Expensify:mainfrom
Krishna2323:krishna2323/fix/connections-regressions

Conversation

@Krishna2323

@Krishna2323 Krishna2323 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixes the regressions reported after #102265. The launch (beta removal, page deletions, link updates and the onboarding text) is in #, on top of this one, so it can be reverted without these fixes.

  • Manage settings on More features now opens /connections instead of /accounting.
  • The Suggest an integration footer link now opens Concierge instead of #admins.
  • Disconnect now closes the panel first and removes the connection after the close animation, so the Not Found page no longer flashes. Covers accounting, Uber and HR/Recruiting.
  • Import / Advanced / Export pages now go Back to the integration's Connections panel, even after a refresh.
  • Connecting an integration on a workspace that is still being created no longer turns the Connections page behind the RHP into a loader.
  • On Collect workspaces, opening Connections now loads the accounting data, so connecting an integration doesn't replace the page with a loader.

Fixed Issues

$ #104013
$ #104032
$ #104319
$ #104320
$ #104029
$ #104321
PROPOSAL: N/A, follow-up to #102265

Tests

Precondition: enable the unifiedConnections beta.

  1. Connect any accounting integration. Go to More features, turn off Categories and click Manage settings. Verify the URL ends with /connections.
  2. On Connections, scroll down and click the footer link. Verify Concierge opens.
  3. Open a connected accounting integration and click the 3-dot menu > Disconnect > Disconnect. Verify the panel closes without showing the Not Found page. Repeat for Uber, and for an HR or Recruiting provider.
  4. Open a connected integration (for example Sage Intacct) > Import. Refresh the page and click Back. Verify the integration's panel opens instead of the RHP closing. Repeat with Advanced.
  5. Create a new workspace and quickly go to its Connections page. Click any accounting integration (for example NetSuite). Verify the page behind the RHP does not turn into a loading spinner.
  6. Have workspace A with NetSuite still setting up. Create a new workspace B, open Connections, click Rillet. Verify the Rillet connect flow opens, not More features. Go back to Connections and verify it isn't loading.
  7. On a Collect workspace with no integration connected, open Connections and connect any accounting integration. Verify the page doesn't turn into a loader.
  • Verify that no errors appear in the JS console

Offline tests

Precondition: enable the unifiedConnections beta.

  1. Go offline and repeat test 3. Verify the panel closes and the integration shows as disconnected on Connections.
  2. Go back online. Verify the disconnect syncs.

QA Steps

Same as tests, with the unifiedConnections beta enabled.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
test_1.mp4

…oncierge, disconnect flash, and Back after refresh on settings pages

Signed-off-by: krishna2323 <[email protected]>
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/actions/Policy/Policy.ts 72.76% <100.00%> (+0.37%) ⬆️
...ages/workspace/WorkspaceMoreFeaturesPage/index.tsx 64.28% <ø> (ø)
...s/workspace/accounting/AccountingContext/index.tsx 95.77% <100.00%> (+0.25%) ⬆️
...sinessCentral/import/BusinessCentralImportPage.tsx 85.52% <100.00%> (+0.39%) ⬆️
...ace/accounting/qbo/import/QuickbooksImportPage.tsx 82.60% <100.00%> (+0.79%) ⬆️
...space/connections/ConnectionsMergeProviderCard.tsx 0.00% <ø> (ø)
...workspace/connections/WorkspaceConnectionsPage.tsx 97.34% <100.00%> (+4.12%) ⬆️
...orkspace/connections/ConnectionsAccountingPage.tsx 97.14% <0.00%> (ø)
...workspace/connections/ConnectionsMergePageBase.tsx 80.00% <0.00%> (ø)
...ace/connections/ConnectionsReceiptPartnersPage.tsx 83.33% <0.00%> (ø)
... and 24 more
... and 13 files with indirect coverage changes

@Krishna2323

Copy link
Copy Markdown
Contributor Author

@JmillsExpensify @trjExpensify @lakchote Two questions before I open it for review:

  1. Can we turn on the new Connections page for everyone in this PR?

    • If yes, everyone will see "Connections" instead of the separate Accounting, HR, Recruiting, Receipt partners and MCP pages. Old links to those pages will still open Connections.
  2. Onboarding task text (Onboarding - Onboarding task shows "Click Accounting" when there is no Accounting tab #104011)

    • When someone finishes onboarding and picks an accounting tool, we post a task in #admins with steps like "1. Click Workspaces, 2. Select your workspace, 3. Click Accounting". With the new page there is no "Accounting" tab. It's called "Connections".
    • The task is written once and doesn't update later. The link inside it already opens the right page. Only the step text is wrong.

Which do you prefer?

  • If we turn the new page on for everyone (question 1), change the step to "Click Connections" for everyone in this PR. This is the simplest option.
  • Show "Click Connections" only to people who have the new page. Downside: someone who gets the new page after onboarding will still see "Accounting".
  • Use wording that works for both, like "Click Accounting (or Connections)".

…an integration turns Connections on

Signed-off-by: krishna2323 <[email protected]>
@trjExpensify

Copy link
Copy Markdown
Contributor
  1. Can we turn on the new Connections page for everyone in this PR?

If yes, everyone will see "Connections" instead of the separate Accounting, HR, Recruiting, Receipt partners and MCP pages. Old links to those pages will still open Connections.

I'm fine with this, so long as we go through staging regression testing first. What we want to avoid is deploying it so customers see the consolidated page and then reverting it.

If we turn the new page on for everyone (question 1), change the step to "Click Connections" for everyone in this PR. This is the simplest option.

Yeah, let's do this. We could have the link open on the Accounting tab in Connections as well btw.

@melvin-bot

melvin-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@Krishna2323

Copy link
Copy Markdown
Contributor Author

@MelvinBot review

@MelvinBot

Copy link
Copy Markdown
Contributor

Review

The PR looks solid overall. I found one real regression to fix before merge, and a few small issues. The four fixes in the description all check out in the code.

Should fix

  1. Admins can no longer turn MCP off. This PR removes the MCP toggle from More features for everyone. Nothing in the UI calls enablePolicyMCP with false any more. Two problems follow:

    • MCP is on by default (features.ts:95-96). So no admin can now block AI-assistant access to a workspace.
    • If a workspace already has MCP off, only the Claude, Cursor and ChatGPT cards turn it back on. The generic MCP card just opens the guide (useMCPConnectionListings.ts:51-58). An admin who follows that guide for another client can't turn MCP on.

    Please confirm this is intended, or add an on/off control.

Minor

  1. Some links still open the "All" tab, not the integration's settings. These links used to open the HR or Recruiting page. Now they open the Connections grid, and the user has to click again:

    You could point them at WORKSPACE_CONNECTIONS_HR / _RECRUITING, or use the new tab param.

  2. Card reconciliation Back always opens the accounting panel. CardReconciliationPage.tsx:150 used to pop the stack. If you open this page from the Expensify Card settlement-account link, Back now loses where you came from.

  3. The "nothing to fetch" check may be wrong. Policy.ts:5163-5167 treats empty policy.connections as "no connections". For a workspace whose connections were never loaded, empty can mean "not loaded". Then an existing connection wouldn't load after you turn Connections on. This only matters if the backend allows a connection while Connections is off. I didn't confirm that.

  4. About 15 callers still navigate to ROUTES.POLICY_ACCOUNTING. Examples are RulesRequireFieldsPage and ImportedFromAccountingSoftware. They work, but they open Connections at /accounting without the Accounting tab. That's optional cleanup.

  5. The PR description is out of date. The last commit removes the beta for everyone. But the description still says "behind the unifiedConnections beta", and test step 5 still tests "without the beta". Please update it, including the onboarding "Click Connections" change.

What I checked
  • Deleted code: nothing in src/ or tests/ still references the deleted pages, hooks, beta constant or translation keys.
  • Old routes: /accounting, /hr, /recruiting, /mcp and /receipt-partners now render WorkspaceConnectionsPage.
  • Ported behavior: auto-start from newConnectionName, the QBO token-expiry hint, the Uber invite flow and switching integrations all moved over.
  • Disconnect: all three panels use Navigation.goBack(..., {afterTransition}). That runs the removal once, outside the component, and still runs if the panel unmounts.
  • Back navigation: this covers every integration's Import/Advanced/Export page, through a fixed route or useDynamicBackPath.
  • Not run: I didn't run typecheck or test the app. I checked locale cleanup with grep only.

view run

…liation Back on the stack, and only skip the connections fetch for a workspace still being created

Signed-off-by: krishna2323 <[email protected]>
…anel where an integration is connected, the Accounting tab otherwise

Signed-off-by: krishna2323 <[email protected]>
@Krishna2323

Copy link
Copy Markdown
Contributor Author

@MelvinBot review

@Krishna2323
Krishna2323 marked this pull request as ready for review October 20, 2026 00:05
@Krishna2323
Krishna2323 requested review from a team as code owners October 20, 2026 00:05
@melvin-bot
melvin-bot Bot requested a review from situchan October 20, 2026 00:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T00:25:32.416492Z b9ab7dd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot
melvin-bot Bot removed the request for review from a team October 20, 2026 00:05
@melvin-bot

melvin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

@situchan Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@MelvinBot

Copy link
Copy Markdown
Contributor

Follow-up review

I reviewed the two new commits. They fix four of my earlier points and introduce no new bugs. Two points are still open.

Fixed

  • HR and Recruiting links now open their panels.
  • Card reconciliation Back uses the navigation stack again.
  • The fetch is now skipped only for a workspace that is still being created (Policy.ts:5163-5168).
  • Links to the old Accounting page now point at Connections. Nothing in src/ still uses POLICY_ACCOUNTING, WORKSPACE_ACCOUNTING, WORKSPACE_HR or WORKSPACE_RECRUITING routes. Each link that opens the accounting panel is only reachable while an integration is connected, so none of them lands on Not Found.

Still open

  1. Admins still can't turn MCP off. Nothing in the UI calls enablePolicyMCP with false, and MCP is on by default (features.ts:95-96). Please confirm this is intended, or add an on/off control.
  2. The PR description is still out of date. It says the changes are behind the beta, and test step 5 tests "without the beta". Item 4 also says Card reconciliation goes Back to the panel after a refresh, which the latest commit no longer does.

Optional: four callers now pass four undefined arguments to reach tab in WORKSPACE_CONNECTIONS.getRoute. One example is ReportActionsUtils.ts:5362. An options object would be easier to read.

I didn't run typecheck or test the app.


view run

Copy link
Copy Markdown
Contributor

My quick comments:

  • Yes, let's turn it on for everyone (agree with Tom that we need to be on top of staging regressions).
  • Fine updating from Accounting to Connections in onboarding but that's polish. It doesn't need to happen before this gets released.

@Krishna2323

Krishna2323 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

@situchan Updated the description and Fixed Issues.

@situchan

Copy link
Copy Markdown
Contributor

Please merge main

@situchan

situchan commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

#104320 is still reproducible. after clicking on accounting, app still opens More features

Screen.Recording.2026-10-22.at.9.57.38.PM.mov

@situchan

Copy link
Copy Markdown
Contributor

Looks good except #104402 (comment).
And #104011 should be removed from Fixed Issues

…s page doesn't send the user to More features before the change lands

Signed-off-by: krishna2323 <[email protected]>
…nections-regressions

# Conflicts:
#	src/pages/workspace/accounting/businessCentral/export/BusinessCentralExportPage.tsx
@Krishna2323

Copy link
Copy Markdown
Contributor Author

#104320 is still reproducible. after clicking on accounting, app still opens More features

@situchan could you please test again? It should be fixed now.

@Krishna2323

Copy link
Copy Markdown
Contributor Author

Failing unit tests isn't related to this PR.

@situchan

Copy link
Copy Markdown
Contributor

#104320 pass ✅

104320.mov

@lakchote lakchote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Krishna2323! Waiting a frame before opening the setup flow fixes the More features redirect, and @situchan's retest passed. LGTM.

cc @Beamanator @mollfpr

@Beamanator Beamanator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great to me!

@lakchote
lakchote merged commit c08c85f into Expensify:main Oct 24, 2026
44 of 47 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 lakchote has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/lakchote in version: 9.5.21-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed: every change in this PR fixes regressions on the Connections page, and that page is only visible behind the unifiedConnections beta (the beta removal ships in a separate launch PR).


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/lakchote in version: 9.5.23-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed: every change in this PR fixes regressions on the Connections page, which is still only visible behind the unifiedConnections beta on main (the beta removal ships in a separate launch PR).


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.23-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants